package chapter5;

public class OverLoadVarargs {
    public void test(String msg) {
        System.out.println("只有一个参数的test方法");
    }

    public void test(String... msg) {
        System.out.println("形参个数可变的test方法");
    }

    public static void main(String[] args) {
        OverLoadVarargs overLoadVarargs = new OverLoadVarargs();
        overLoadVarargs.test();
        overLoadVarargs.test("a", "b");
        overLoadVarargs.test("a");
        overLoadVarargs.test(new String[] {"a"});
    }
}
